package cn.blue.exception;
import lombok.Data;

@Data
public class GlobalException extends RuntimeException {
    private String message;
    private String errorCode;

    public GlobalException(String message, String errorCode) {
        super(message);
        this.errorCode = errorCode;
    }
    public GlobalException(GlobalExceptionCodeEnum globalExceptionCodeEnum) {
        super(globalExceptionCodeEnum.getMessage());
        this.message = globalExceptionCodeEnum.getMessage();
        this.errorCode = globalExceptionCodeEnum.getErrCode();
    }

}
